
#include <stdio.h>
#include "STLOG.h"
#include "STL_Scheduler.h"
#include <unistd.h>
#include <memory>
#include <mutex>

using namespace STL;

int main(int argc, char *argv[])
{
    stlog_debug("Hello World!111\n");
    
    // std::mutex tempMutex;
    // tempMutex.lock();
    STL_Scheduler::getInstance()->setTimeout([&](float fd) {
        stlog_debug("Hello World!222\n");
        // tempMutex.unlock();
    },5,"333");

    stlog_debug("Hello World!333\n");
    // tempMutex.lock();

    STL_Scheduler::getInstance()->setInterval([](float fd) {
        stlog_debug("Hello World!444\n");
    }, 2, "123");
    STL_Scheduler::getInstance()->loop();
    return 0;
}
